#include <iostream>
using namespace std;

int main (void)
{
	// "\000" 和'\0' 含义一样 都是0
	char buf[] = "0001\00012345678\000123456";
	struct Acc {
		char type[5];
		char id[9];
		char passwd[6];
	};
	Acc *p = reinterpret_cast <Acc *> (buf);
	cout << "type = " << p->type << endl;
	cout << "id = " << p->id << endl;
	cout << "passswd = " << p->passwd << endl; 
	return 0;
}
